package eu.telecom_bretagne.CESI.service;

import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;

import eu.telecom_bretagne.CESI.data.dao.DocumentDAO;
import eu.telecom_bretagne.CESI.data.model.Document;

/**
 * Session Bean implementation class GestionDocument
 */
@Stateless
@LocalBean
public class GestionDocument implements IGestionDocument {
	
	@EJB
	DocumentDAO documentDAO;
	
    /**
     * Default constructor. 
     */
    public GestionDocument() {
        // TODO Auto-generated constructor stub
    }

	@Override
	public Document lireDocument(int id_document) {
		Document document = documentDAO.findById(id_document);
		return document;
	}

}
